package com.kedeng.yangmuyi.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.kedeng.yangmuyi.dto.LoginUserDTO;

/**
 * 
 * Handles requests for the application home page.
 * 
 * @author: rqian
 * @version: 1.0, Apr 26, 2012
 */
@Controller
public class HomeController extends AbstractController {
    
    private static final Logger logger = LoggerFactory.getLogger(HomeController.class);

    @RequestMapping(value = "/welcome.do", method = RequestMethod.GET)
    public ModelAndView getIndexPage(Model model) {
        logger.info("Welcome home!");
        model.addAttribute("loginUser", new LoginUserDTO());
        return new ModelAndView("welcome");
    }

}
